package PTA_JAVA.JavaBase.JavaBase19;

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int foot=(int)(a/30.48);
        int inch=(int)((a/30.48-foot)*12);
        System.out.printf("%d %d",foot,inch);
    }
}